package top.xiaoshuaila.searescue.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import top.xiaoshuaila.searescue.pojo.Serial;

@Controller
public class baojin {
    @Autowired
    private Serial serial;
    @RequestMapping("alert")
    @ResponseBody
    public void alert(){
        serial.setSystemStatus(1);
    }
    @RequestMapping("safe")
    @ResponseBody
    public void safe(){
        serial.setSystemStatus(0);
    }
    @RequestMapping("help")
    @ResponseBody
    public void help(){
        serial.setSystemStatus(2);
    }
}
